<?php

if (!defined('BASEPATH'))
    exit('No direct script access allowed');

class Be_controller extends CI_Controller {

    public function __construct() {
        parent::__construct();
        if(!$this->is_admin_logged()){
            redirect('login');
        }
    }

    private function is_admin_logged() {
        return $this->session->userdata('user_id');
    }

}

?>
